{% extends "menu.html" %}
{% block content %}

        <!-- page content -->
        <div class="right_col" role="main">
          <div class="">
            <div class="page-title">



            </div>
            <div class="clearfix"></div>
            <div class="row">
              <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                  <div class="x_title">
                    <h2>用户信息更新</h2>

                    <div class="clearfix"></div>
                  </div>
                  <div class="x_content">
                    <br />
                    <form id="demo-form2" data-parsley-validate class="form-horizontal form-label-left" method="post">
                        {% csrf_token %}
                      <div class="form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">ID <span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <input type="text" id="first-name" required="required" class="form-control col-md-7 col-xs-12" name="id" value="{{ user_info.id }} " readonly="readonly">
                        </div>
                      </div>
                      <div class="form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="last-name">用户名 <span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <input type="text" id="last-name"  required="required" class="form-control col-md-7 col-xs-12" dirname="user_name" value="{{ user_info.user_name }}" readonly="readonly">
                        </div>
                      </div>
                      <div class="form-group">
                        <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">用户密码</label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <input id="middle-name" class="form-control col-md-7 col-xs-12" type="password" name="user_password" value="{{ user_info.user_password }}">
                        </div>
                      </div>

                      <div class="form-group">
                        <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">授权项目<span class="required">*</span></label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <select name="project_list" class="col-md-6 col-sm-6 col-xs-12" size="10" style="width: 100%" multiple>
                              {%  for project in project_list %}
                              <option value ="{{ project.id }}">{{ project.p_name }}</option>
                              {% endfor %}
                          </select>
                        </div>
                      </div>
                      <div class="form-group">
                        <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">授权访问地址<span class="required">*</span></label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <select name="url_list" class="col-md-6 col-sm-6 col-xs-12" size="10" style="width: 100%" multiple>
                              {% for url in url_list %}
                              <option value ="{{ url.id }}">{{ url.permission_name }}</option>
                              {% endfor %}
                          </select>
                        </div>
                      </div>


                    <div class="form-group">
                        <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">是否设置为管理员:<span class="required">*</span></label>
                        <div class="col-md-6 col-sm-6 col-xs-12" style="margin-top: 8px">
                          是:
                        <input type="radio" class="flat" name="role" id="genderM" value="1"  required />
                            否:
                        <input type="radio" class="flat" name="role" id="genderF" value="0" checked="" />
                        </div>

                      </div>
                        <div class="ln_solid"></div>
                      <div class="form-group">
                        <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
                          <button class="btn btn-primary" type="button">Cancel</button>
						  <button class="btn btn-primary" type="reset">Reset</button>
                          <button type="submit" class="btn btn-success">Submit</button>
                        </div>
                      </div>

                    </form>
                  </div>
                </div>
              </div>
            </div>


          </div>
        </div>
{% endblock %}